package cn.edu.scau.cmi.ema.dao;

import cn.edu.scau.cmi.ema.base.CmiPagination;
import cn.edu.scau.cmi.ema.domain.Detect;
import org.springframework.dao.DataAccessException;

import java.util.Calendar;
import java.util.Set;

public interface DetectDAO extends JpaDao<Detect> {

	public Detect findDetectById(Integer id) throws DataAccessException;

	public Detect findDetectById(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Detect> findDetectByName(String name) throws DataAccessException;

	public Set<Detect> findDetectByName(String name, int startResult, int maxRows) throws DataAccessException;

	public Set<Detect> findDetectByNameContaining(String name_1) throws DataAccessException;

	public Set<Detect> findDetectByNameContaining(String name_1, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Detect> findDetectByDate(Calendar date) throws DataAccessException;

	public Set<Detect> findDetectByDate(Calendar date, int startResult, int maxRows) throws DataAccessException;

	public Set<Detect> findDetectByConclusion(String conclusion) throws DataAccessException;

	public Set<Detect> findDetectByConclusion(String conclusion, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Detect> findDetectByConclusionContaining(String conclusion_1) throws DataAccessException;

	public Set<Detect> findDetectByConclusionContaining(String conclusion_1, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Detect> findDetectByDescription(String description) throws DataAccessException;

	public Set<Detect> findDetectByDescription(String description, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Detect> findDetectByDescriptionContaining(String description_1) throws DataAccessException;

	public Set<Detect> findDetectByDescriptionContaining(String description_1, int startResult, int maxRows)
			throws DataAccessException;

	public Detect findDetectByPrimaryKey(Integer id) throws DataAccessException;

	public Detect findDetectByPrimaryKey(Integer id, int startResult, int maxRows) throws DataAccessException;

	public Set<Detect> findDetectsByIds(Set<Integer> ids) throws DataAccessException;

	public Set<Detect> findAllDetects() throws DataAccessException;

	public Set<Detect> findAllDetects(int startResult, int maxRows) throws DataAccessException;

	public Set<Detect> findDetectsByDetectdepartment(Integer detectdepartmentId, int start, int max);

	public Set<Detect> findDetectsByFoodbatch(Integer foodbatchId, int start, int max);

	public Set<Detect> findDetectsByDetector(Integer userId, int start, int max);

	public Set<Detect> findDetectsBySubject(Integer subjectId, int start, int max);

	public Set<Detect> findDetectByCompositeProperities(String sql, int startResult, int maxRows)
			throws DataAccessException;

	public Set<Detect> findDetectsByDetachedCriteria(CmiPagination page) throws DataAccessException;

	public Detect findDetectByPhysicalPrimaryKey(Integer subjectId, Integer foodbatchId, Calendar date,
			Integer detectorId, Integer detectdepartmentId) throws DataAccessException;

	public Detect findDetectByPhysicalPrimaryKey(Integer subjectId, Integer foodbatchId, Calendar date,
			Integer detectorId, Integer detectdepartmentId, int startResult, int maxRows) throws DataAccessException;
}
